package com.tnsw.noxnox;

import java.util.Set;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.graphics.Bitmap;
import android.util.Log;
import android.view.Menu;
import android.widget.ImageView;

public class SendActivity extends Activity {

	private String tag = "SendActivity";
	private ImageView img1;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_send);
		
		this.img1 = (ImageView) this.findViewById(R.id.img1);
		
		Log.d(tag, "onCreated()");
		Intent intent = this.getIntent();

		Log.d(tag, "Action=" + intent.getAction());
		Bundle extras = intent.getExtras();
		Set<String> set = extras.keySet();
		for (String s : set) {
			Log.d(tag, "key=" + s + ", values=" + extras.get(s).toString());
			
		}
		
		if (extras.get("share_screenshot") != null) {
			Bitmap bmpScreenshot = (Bitmap) extras.get("share_screenshot");
			Log.d(tag, "bmp_width=" + bmpScreenshot.getWidth() + ", bmp_height=" + bmpScreenshot.getHeight());
			this.img1.setImageBitmap(bmpScreenshot);			
		}
		
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.send, menu);
		return true;
	}

}
